package com.sjgl.esdn;

import com.sjgl.esdn.domain.entity.FileManagement;
import com.sjgl.esdn.mapper.FileManageMapper;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import java.util.List;

@SpringBootTest
class EsdnApplicationTests {

	@Test
	void contextLoads() {
	}

	@Autowired
	private FileManageMapper fileManageMapper;
	FileManagement fileManagement;

	@Test
	public void testSelectFile() {
		List<FileManagement> list = fileManageMapper.fileAll();
		for (FileManagement fileManagement : list) {
			Long fileId = fileManagement.getFileId();
			Long abandonId = fileManageMapper.findAbandonId(fileId);
			Long userId = fileManagement.getCreateBy();
			Long deptId = fileManageMapper.findDeptidByuserid(userId);
			String b = fileManageMapper.findLeader(deptId);

		}
	}
}
